import { BUTTON_PORT } from "@/api/config/servicePort";
import http from "@/api";
import { Button, ResPage } from "@/api/interface";

export const getButtonList = (params: Button.ReqButton | {}) => {
  return http.post<ResPage<Button.ResButton>>(BUTTON_PORT + `/list`, params, { loading: false });
};

export const deleteButton = (id: string[]) => {
  return http.post(BUTTON_PORT + `/delete`, id, { loading: false });
};

export const editButton = (params: Button.ResButton) => {
  return http.post(BUTTON_PORT + `/edit`, params, { loading: false });
};

export const addButton = (params: Button.ResButton) => {
  return http.post(BUTTON_PORT + `/add`, params, { loading: false });
};
